package thread;

public class demo21 {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        //需要先加锁再释放当前的锁
        synchronized (object){
            System.out.println("start");
            object.wait();
            System.out.println("end");
        }
    }
}
